<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateNetworkAdminTablele extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('network_admin', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name')->nullable()->comment('姓名');
            $table->string('phone')->index()->unique()->comment('手机');
            $table->string('password')->comment('密码');
            $table->boolean('gender')->default(1)->comment('性别 0未知  1男  2女');
            $table->string('avatar')->nullable()->comment('头像');
            $table->unsignedInteger('network_id')->nullable()->comment('归属网点');
            $table->unsignedTinyInteger('status')->default(1)->comment(' 状态    0未启用   1启用');
            $table->unsignedTinyInteger('registration_type')->default(0)->comment('注册方式    0站点创建');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('network_admin');
    }
}
